#include <filesystem>
#include <toml++/toml.hpp>
#include "base/xlog.h"
#include "base/exceptiondump.h"
#include "app_config.h"
#include "adapters_info.h"
#include "driver2socks.h"

#pragma comment(lib, "dbghelp.lib")


int main(int argc, char** argv)
{
    ExceptionDump::Init("./");
    XLogMgr::get()->InitLog("./","d2s-cli","d2s-cli");
    XLogMgr::get()->SetLevel(spdlog::level::info);
    SINFO("------------APP START------------");

    Driver2SocksConfig cfg;

    if (!cfg.readFromFile("cfg.toml")) {
        SERROR("cfg.toml parse error.");
        return -1;
    }

    driver2socksStart(&cfg);



	return 0;
}
